package behavior.mediator;

public class Test {
    public static void main(String[] args) {

        //中介者模式
        ConcreteMediator concreteMediator = new ConcreteMediator();
        Alarm alarm = new Alarm(concreteMediator,"Alarm1");
        new TV(concreteMediator,"TV1");

        //闹钟 到了 开关电视
        alarm.sendAlarm(1);
    }
}
